<template>
	<view class="user-list u-f-ac animate__animated animate__fadeInLeft animate__fast">
		<image @tap.stop="openSpace"
		:src="item.userpic" 
		mode="widthFix" 
		lazy-load>
		</image>
		
		<view class="">
			<view>{{item.username}}</view>
			<view style="display: inline-block;">
				<tag-sex-age :age="item.age" :sex="item.sex"></tag-sex-age>
			</view>
		</view>
		
		<view class="icon iconfont u-f-ajc" v-show="!hidden"
		:class="[item.isguanzhu ? 'icon-xuanze-yixuan' : 'icon-zengjia1' ]"></view>
	</view>
</template>

<script>
	import tagSexAge from "../../components/common/tag-sex-age.vue";
	
	export default {
		components:{
			tagSexAge
		},
		props:{
			hidden: {
				type: Boolean,
				default: false
			},
			item: Object,
			index: Number
		},
		methods: {
			openSpace(){
				uni.navigateTo({
					url:"../../pages/user-space/user-space?userid="+this.item.id
				})
			}
		},
	}
</script>

<style scoped>
	.user-list{
		margin-left: 20upx;
		margin-right: 10upx;
		padding: 20upx 0;
		border-bottom: 1upx solid #EEEEEE;
	}
	.user-list>image{
		width: 100upx;
		height: 100upx;
		border-radius: 100%;
		margin-right: 20upx;
		flex-shrink: 0;
	}
	.user-list>view:first-of-type{
		flex: 1;
	}
	.user-list>view:first-of-type>view:first-child{
		font-size: 35upx;
	}
	.user-list>view:last-of-type{
		width: 90upx;
		color: #CCCCCC;
	}
	
	.icon-zengjia1{
		color: #F8791B !important;
	}
</style>
